package com.rykj.util.compress;


import com.lcw.library.imagepicker.compressimage.CompressImageInfoGetter;
import com.lcw.library.imagepicker.compressimage.CompressImageResultAdapter;

import java.util.ArrayList;
import java.util.List;

/**
 * description:   返回压缩后的 文件的路径集合
 * @author ycw
 */
public final class PathCompressResultFactory extends CompressImageResultAdapter.Factory {

    @Override
    public CompressImageResultAdapter<List<String>> creat() {
        return new CompressImageResultAdapter<List<String>>() {

            @Override
            public List<String> convert(CompressImageInfoGetter... compressImageInfoGetters) {
                List<String> strings = new ArrayList<>();
                for (CompressImageInfoGetter getter : compressImageInfoGetters) {
//                    FileRequestBody requestBody = new FileRequestBody(FileRequestBody.TYPE_IMAGE, new File(getter.imageFilePath()));
//                    resultMap.put(getImageMdStr(getter.requestPramsName(), getter.imageFileName()), requestBody);
                    strings.add(getter.imageFilePath());
                }
                return strings;
            }
        };
    }

}
